package test

import (
	"NovelBook/models/res"
	"NovelBook/utils/response"
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
)

// PingPong ping-pong test API.
//
//	@Summary		Ping-pong API
//	@Description	Ping-pong test API, returns a message "PingPongTest"
//	@Tags			Test
//	@Accept			json
//	@Produce		json
//	@Success		200	{object}	msg.ResMsg{data=string}	"PingPongTest"
//	@Failure		500	{object}	msg.ResMsg				"Internal server error"
//	@Router			/test/ping [get]
func PingPong(c *gin.Context) {
	var p res.Pong
	// do something
	p.Msg = "PingPongTest"
	zap.L().Info("", zap.String("msg", p.Msg))
	response.Success(c, p.Msg)
}
